<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>表单基本用法</title>
    </head>
    <body>

<!--         能够总是实时更新  @input 相当于 v-on:input -->
        <div id = "app">
            <input type="text" @input = "handleInput" placeholder = "输入...">
            <br>
            <br>
            <br>
            <p>输入的内容是：{{ message }}</p>
        </div>
        <script src = "../../vue.min.js"></script>
        <script>
            var app = new Vue({
                el:"#app",
                data:{
                    message:''
                },
                methods:{
                    handleInput:function (e){
                        this.message = e.target.value;
                    }
                }

            })
        </script>
    </body>
</html>